﻿using System;
namespace Clipper.Model
{
	/// <summary>
	/// ReagentKit:实体类(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public partial class ReagentKit:AbstractModel
	{
		public ReagentKit()
		{}
		#region Model
        private int _holenumber;
        private DateTime? _loaddate1;
        private int? _loaddate2;
        private int? _reagentid1;
        private string _reagentid2;
        private Reagent _reagentModel1;
        private Reagent _reagentModel2;
        private int? _reagentLeft1;
        private int? _reagentLeft2;

        private string _reagentName;
        public string ReagentName
        {
            get
            {
                return _reagentName;
            }
            set
            {
                _reagentName = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int holeNumber
		{
			set{ _holenumber=value;}
			get{return _holenumber;}
		}
		/// <summary>
		/// 
		/// </summary>
        public DateTime? loadDate1
        {
            set { _loaddate1 = value;
            NotifyPropertyChanged("loadDate1");
            }
            get { return _loaddate1; }
        }
        /// <summary>
        /// 盘2装在日期
        /// </summary>
        public int? loadDate2
        {
            set
            {
                _loaddate2 = value;
                NotifyPropertyChanged("loadDate2");
            }
            get { return _loaddate2; }
        }
		/// <summary>
		/// 试剂1ID
		/// </summary>
		public int? ReagentID1
		{
			set{ _reagentid1=value;
            NotifyPropertyChanged("ReagentID1");
            }
			get{return _reagentid1;}
		}
        /// <summary>
        /// 试剂1Model
        /// </summary>
        public Reagent ReagentModel1
        {
            set
            {
                _reagentModel1 = value;
                NotifyPropertyChanged("ReagentModel1");
            }
            get
            {
                return _reagentModel1;
            }
        }
		/// <summary>
		/// 试剂2ID
		/// </summary>
        public string ReagentID2
        {
            set
            {
                _reagentid2 = value;
                NotifyPropertyChanged("ReagentID2");
            }
            get { return _reagentid2; }
        }
        ///// <summary>
        ///// 试剂2Model
        ///// </summary>
        public Reagent ReagentModel2
        {
            set
            {
                _reagentModel2 = value;
                NotifyPropertyChanged("ReagentModel2");
            }
            get
            {
                return _reagentModel2;
            }
        }
        /// <summary>
        /// 试剂1剩余次数
        /// </summary>
        public int? RemainTimes1
        {
            get
            {
                if (ReagentModel1 != null)
                {
                    if (ReagentModel1.DetectItemModel.reagentAmount1 > 0)
                    {
                        _reagentLeft1= ReagentModel1.ReagentLeft / _reagentModel1.DetectItemModel.reagentAmount1;
                    }
                    else
                    {
                        _reagentLeft1= 0;
                    }
                }
                else
                {
                    _reagentLeft1 = null; ;
                }
                return _reagentLeft1;
            }
            set
            {
                _reagentLeft1 = value;
                NotifyPropertyChanged("RemainTimes1");
            }
        }
        ///// <summary>
        ///// 试剂2剩余次数
        ///// </summary>
        public int? RemainTimes2
        {
            get
            {
                if (ReagentModel2 != null)
                {
                    if (ReagentModel2.DetectItemModel.reagentAmount2 > 0)
                    {
                        _reagentLeft2 = ReagentModel2.ReagentLeft / ReagentModel2.DetectItemModel.reagentAmount2;
                    }
                    else
                    {
                        _reagentLeft2 = 0;
                    }
                }
                else
                {
                    _reagentLeft2 = null;
                }
                return _reagentLeft2;
            }
            set
            {
                _reagentLeft2 = value;
                NotifyPropertyChanged("RemainTimes2");
            }
        }

       


        ///// <summary>
        ///// 剩余量
        ///// </summary>
        //public int reagentLeft1
        //{
        //    set{
        //        _reagentleft1=value;
        //        NotifyPropertyChanged("reagentLeft1");
        //    }
        //    get
        //    {
        //        return _reagentleft1;
        //    }
        //}

        ///// <summary>
        ///// 剩余量
        ///// </summary>
        //public int reagentLeft2
        //{
        //    set
        //    {
        //        _reagentleft2=value;
        //        NotifyPropertyChanged("reagentLeft2");
        //    }
        //    get{return _reagentleft2;}
        //}
        #endregion Model

    }
}

